package com.yuoj.yuojbackenduserservice.controller.inner;

import com.yuoj.backendcommon.entity.User;
import com.yuoj.yuojbackendserviceclient.service.UserFeignClient;
import com.yuoj.yuojbackenduserservice.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Collection;
import java.util.List;

/**
 * @author 刘渠好
 * @since 2025-04-12 19:22
 */
@RestController
@RequestMapping("/inner")
public class UserInnerController implements UserFeignClient {

    @Resource
    private UserService userService;


    @Override
    @GetMapping("/get/id")
    public User getById(long id) {
        return userService.getById(id);
    }

    @Override
    @GetMapping("/get/ids")
    public List<User> listByIds(Collection<Long> idList) {
        return userService.listByIds(idList);
    }
}
